import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:pornhub_app/components/app_bar/app_bar_view.dart';
import 'package:pornhub_app/views/mine/mine_releases/mine_release_brushvideo_tab.dart';
import 'package:pornhub_app/views/mine/mine_releases/mine_release_community_tab.dart';

import '../../../components/tab_bar_indicator/easy_fixed_indicator.dart';
import '../../../utils/color.dart';

class MineRealeasesIndexTab extends StatelessWidget {
  MineRealeasesIndexTab({super.key});

  final List tabs = ['G圈', '刷片'];

  Widget initList(String text) {
    if (text == 'G圈') {
      return MineReleaseCommunityTab();
    }
    if (text == '刷片') {
      return MineReleaseBrushVideoTab();
    }
    return Container();
  }

  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
      length: tabs.length,
      child: Scaffold(
        appBar: AppBarView(titleText: '我的发布'),
        // appBar: AppBar(
        //   iconTheme: const IconThemeData(color: Colors.white),
        //   title: TabBar(
        //       tabAlignment: TabAlignment.center,
        //       isScrollable: false,
        //       labelColor: COLOR.hexColor('#ffffff'),
        //       unselectedLabelColor: COLOR.hexColor('#666666'),
        //       labelStyle:
        //           TextStyle(fontSize: 16.w, fontWeight: FontWeight.w600),
        //       unselectedLabelStyle:
        //           TextStyle(fontSize: 16.w, fontWeight: FontWeight.w500),
        //       dividerColor: Colors.transparent,
        //       // indicatorPadding: EdgeInsets.only(bottom: 6.w),
        //       indicator: EasyFixedIndicator(
        //         width: 0.w,
        //         height: 0.w,
        //       ),
        //       tabs: tabs.map((v) => Tab(text: v)).toList()),
        //   centerTitle: true,
        // ),
        body: MineReleaseCommunityTab(),
      ),
    );
  }
}
